package cn.ydw.community.dao;

import cn.ydw.community.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author dw
 * @since 2020-10-18
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    User selectUserById(Integer id);

    User selectUserByName(String username);

    User selectByEmail(String email);

    int updateStatus(@Param("userId") int userId, @Param("status") int status);

    int updateHeader(@Param("userId") Integer userId, @Param("headerUri") String headerUri);

    int updatePassword(@Param("userId") Integer userId, @Param("password") String password);

}
